package com.leftheart.entity;

import com.leftheart.utils.DateUtils;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@NoArgsConstructor
public class User {
    private int userId;
    private long accounts;
    private String userName;
    private String userPwd;
    private String reTime;


    public String getReTime() {
        return reTime;
    }

    public void setReTime() {
        this.reTime = DateUtils.jsonDate(new Date());
    }

    public User(int userId, long accounts, String userName, String userPwd, String reTime) {

        this.userId = userId;
        this.accounts = accounts;
        this.userName = userName;
        this.userPwd = userPwd;
        this.reTime = DateUtils.jsonDate(new Date());
    }
}
